<template>
    <div class="searchType tongYc">
        <Button :type="type == 1?'primary':'default'" @click="sL_pt(1)"
                class="marginB5  wcV otoqQ">专利号查询
        </Button>
        <Button :type="type == 2?'primary':'default'" @click="sL_pt(2)"
                class="marginB5  wcV otoqQ">专利名查询
        </Button>
        <Button :type="type == 3?'primary':'default'" @click="sL_pt(3)"
                class="marginB5  wcV otoqQ">申请人查询
        </Button>
        <Button :type="type == 4?'primary':'default'" @click="sL_pt(4)"
                class="marginB5  wcV ">代理人查询
        </Button>
        <Button :type="type == 5?'primary':'default'" @click="sL_pt(5)"
                class="marginB5  wcV ">代理机构查询
        </Button>
    </div>
</template>

<script>
export default {
    name: "customBtn",
    props:['type'],
    data(){
        return {}
    },
    methods:{
        sL_pt(type) {
            let placeholder='';
            if (type == 1) {
                placeholder = '请输入专利号'
            } else if (type == 2) {
                placeholder = '请输入专利名称'
            } else if (type == 3) {
                placeholder = '请输入申请人名称'
            } else if (type == 4) {
                placeholder = '请输入代理人名称'
            } else if (type == 5) {
                placeholder = '请输入代理机构名称'
            }
            this.$emit("select_type", {type,placeholder})
        },
    }
}
</script>

<style lang="less" scoped>
@import "../less/tongyc.less";
</style>